 <#include "../common/head.ftl">
<!--contaniner-->
<div id="box">
	<!--boxleft-->
	<div class="boxleft">
		<ul>
			<li class="currentjob"><a href="${base}/emergent"
				style="color: #0089e9;">急招</a></li>
			<li><a href="${base}/postoffice">发布职位</a></li>
			<li><a href="${base}/ownjob">我的职位</a></li>
		</ul>
	</div>
	<!--/.boxleft-->

	<!--boxright-->
	<#if emergent_list??> 
	<#list emergent_list as em>
	<div class="boxright">
		<!--jobtit-->
		<#assign id=em.id>
		<div class="jobtit">
			<div class="jobtit_l">
				<p class="jobtitrenew pt20">
				<!-- <a href="${base}/ownjob/j_${em.id }.html?resume=${em.resume_num }" title="${em.title }"> -->
					<span class="jobtitrenewl"><a title="${em.title }">${em.title }</a></span>
					<!-- <span class="jobtitrenewr">有效期至：<em>08-21</em></span> -->
				</p>
				<p class="pt75">${em.job_type }</p>
				<p>${em.work_type}&nbsp;&nbsp;${em.salary}</p>
			</div>
			
			<div class="jobtit_r">
				<span class="numfother"><em style="color: #000;">${em.resume_num }</em>份</span>
				<span class="obtainother">收到简历</span>
			</div>
		</div>


		<!--/.jobtit-->

		<!--alarm-->
		<div class="alarm">
			<p>
				<img src="${base}/resources/images/red_03.png" alt="" />
			</p>
			<#assign hour=em.over_time?substring(0,2)>
		 	<#assign min=em.over_time?substring(3,5)>
		 	<#assign sec=em.over_time?substring(6,8)>
			<b class="time"><font class="alarmtime">剩余<span></span><em></em></font></b>
		</div>
		<!--/.alarm-->

		<!--9-0 info-->
		<div class="jobname">
			<a>${em.title }</a> 收到的简历
		</div>
		<!--/.9-0 info-->


		<!--listcon-->
		<div class="detail">
			
		</div>
		<!--/.listcon-->
		</#list> </#if>

	</div>
	<!--/.boxright-->
	<!--清浮动-->
	<div style="clear: both"></div>

</div>
<!--/.contaniner-->


<!--footer-->
<#include "../common/bottom.ftl">
<!--/.footer-->



<!--加边框鼠标事件-->
<script type="text/javascript">
	$(function(){
		timeCounter();
		job_resume_list(1);
		
	});
    function ShowBorder(studentinfotip){
    	studentinfotip.style.border = "solid 1px #0089e9";
    };
    
    function HideBorder(studentinfotip){
    	studentinfotip.style.border = "solid 1px #e5e5e5";
    };
    
  //倒计时
	var timeCounter = (function() {
		 var ints;
		 var total = 3600;
		 total = total*parseInt('${hour}')+parseInt('${min}')*60+parseInt('${sec}');
		 return function(hour) {
			  var s = (total%60) < 10 ? ('0' + total%60) : total%60;
			  var h = total/3600 < 10 ? ('0' + parseInt(total/3600)) : parseInt(total/3600);
			  var m = (total-h*3600)/60 < 10 ? ('0' + parseInt((total-h*3600)/60)) : parseInt((total-h*3600)/60);
			  $(".time span").html(h + ":" + m + ":" + s);
			 total--;
			 ints = setTimeout("timeCounter()",1000)
			  if(total < 0){
				  clearTimeout(ints);
			  } 
			 }
		 
	})();
    
    function job_resume_list(page){
    	 $.post('${base}/emergent/resume',{
				'positionID':'${id}',
				'pageNO':page,
				'emergent':1
			},function(data){
				if(data.result>0){
					$(".detail").empty();
					$(data.data).each(function(){
						if(parseInt(this.internships)>0){//判断是否有经验
							em = "<span class='txtop2_li'>有工作经验</span>";
						}else{
							em="";
						}
						if(this.head_img != "" && this.head_img != "(null)"){//判断图像是否存在
							img = "<img src='"+this.head_img+"' alt='用户头像' onerror='nofind();'/>"
						}else{
							img = "<img src='${base}/resources/images/usertx.png' alt='用户头像'/>";
						}
						if(this.title.length>10){
							tittemp = this.title.substring(0,10);
						}else{
							tittemp = this.title;
						}
						var sal_tmp="";
						if(this.salary=="20001-60000"){
							sal_tmp="20001以上";
						}else if(this.salary=="1000-20000"){
							sal_tmp="面议";
						}else{
							sal_tmp = this.salary;
						}
						$div = $("<div class='jobinfotip' onmouseover='ShowBorder(this)' onmouseout='HideBorder(this)'>"
								+"<a href='${base}/resume/r-"+this.stu_resume_id+".html?internships="+this.internships+"'><p>"
								+"<span class='jobnewtip'>应聘："+tittemp+"</span> "
								+"<span class='jobnew pt30'><em>"+this.add_time+"</em></span> </p> "
								+"<span class='jobinfotip_l'> <p class='pt30'>"+this.full_name+"    "+this.sex+"    "+this.title+"</p> "
								+"<p>"+this.birthday+"    "+this.certificate_type+"    "+sal_tmp+"    "+this.employment_type+"</p> <p>"+this.major_name+"    "+this.school_name+"</p> </span></a> "
								+"<span class='jobinfotip_r_have_li'>"+ img+ em +"</span></div>");
						$(".detail").append($div);
					})
					
					if(data.page>1){
						var prew=data.page-1;
						$(".detail").append("<button type='submit' class='pagebtn pagebtnother prew' onclick='job_resume_list(\""+prew+"\")'>上一页</button>");
					}else{
						$(".detail").append("<button type='submit' class='pagebtn'>上一页</button>");
					}
					if(data.result<20){
						$(".detail").append("<button type='submit' class='pagebtn'>下一页</button>");
					}else{
						var next=data.page+1;
						$(".detail").append("<button type='submit' class='pagebtn pagebtnother next' onclick='job_resume_list(\""+next+"\")'>下一页</button>");
					}
				}else{
					$(".detail").empty();
					$(".detail").append("<p id='nodata'>"+data.message+"</p>");
				}
			});
    };
    
  //图片不存在处理
	function nofind(){
		var img=event.srcElement;
		img.src="${base}/resources/images/usertx.png";
		img.onerror=null; 
	}
 </script>
<!--/.加边框鼠标事件-->
<!--/.js-->

</body>
</html>